<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <style>
    .alert-log{
      display: none;
    }
    </style>
</head>
<body>
  <h1 class="alert alert-danger">您的输入有误</h1>
  <h1 class="alert alert-success">您的输入正确</h1>

  <div class="alert alert-warning alert-dismissible" >
    <button class="close" data-dismiss="alert">按钮</button>
    警告
  </div>

  <button class="btn btn-info btn-log">登陆</button>
  <h1 class="alert alert-success alert-log alert-dismissible">
    <button class="close" data-dismiss="alert">
      <span>&times;</span>
    </button>
    恭喜您
  </h1>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(function(){
$(".btn-log").click(function(){
  $(".alert-log").show(2000);
})
})
</script>
</body>
</html>